home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / archive / userbox / publicdomain / frexxed.lha / frexxed / fpl / AutoMatch.FPL < prev    next >
Text File  |  1995-07-19  |  444b  |  17 lines

  1. export void AutoMatch(string paren)
  2. {
  3.   Output(paren);        // Output the character
  4.   CursorLeft(1);        // Step back to the character
  5.   if (MatchParen()>=0) {    // Try to match it
  6.     Delay(4);            // Make a delay
  7.     MatchParen();        // Match it back
  8.   } else
  9.     ReturnStatus("No match!");  // No match!
  10.   CursorRight(1);        // Step forward
  11. }
  12.  
  13. AssignKey("AutoMatch(\")\");", ")");
  14. AssignKey("AutoMatch(\"}\");", "}");
  15. AssignKey("AutoMatch(\"]\");", "]");
  16.  
  17.